/*================================================================
*   Copyright (C) 2017 LiuYao. All rights reserved.
*   
*   Filename : sum_grad_factory.h
*   Author : LiuYao
*   Date : 2017-12-28
*   Description : 
*
================================================================*/
#ifndef _SUM_GRAD_FACTORY_H
#define _SUM_GRAD_FACTORY_H

#include "../graph/graph.h"
#include "../graph/node.h"
#include "../graph/ops/sum_grad_op.h"
#include "../factory/factory.h"

class SumGradFactory : public Factory {
    private:
        Node* node_;
        Shape* shape_;
        
        Node* hook() { return new SumGrad(node_, shape_); }

    public:
        SumGradFactory(Node* node, Shape* shape) : node_(node), shape_(new Shape(shape -> rows, shape -> cols)){}
        ~SumGradFactory();
};

#endif
